<?php
//Start session
if (!isset($_SESSION))
{
    session_start();
}

if(!isset($_SESSION['SESS_USER_ID']) || (trim($_SESSION['SESS_USER_ID']) == ''))
{
    $loggedin = false;
}
else
{
    $loggedin = true;
}

$cur_path = $_SERVER['SCRIPT_NAME'];
define("ADMIN_PATTERN", "/\/admin\/\b/");

$appendURL = "";
$adminURL = "admin/";

if(preg_match(ADMIN_PATTERN, $cur_path) == 1)
{
    $appendURL = "../";
    $adminURL = "";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Da Kine Points - <?php echo $titleloc?></title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo $appendURL; ?>includes/ajax.js"></script>
    <link href="<?php echo $appendURL; ?>styles/styles.css" rel="stylesheet" type="text/css" />
    <body>
        <div id="container">
            <div id="header">
            <h1>Da Kine Points</h1>
            </div>
            <div id="main_content_top"></div>
            <div id="main_content">
                <div id="content">